<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-store">
    <meta http-equiv="Cache-control" content="no-store">
    <meta http-equiv="Cache" content="no-store">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

    <title>Self Note</title>
    <link rel="stylesheet" href="./lib/bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <!--<script src="./lib/jquery.min.js"></script>-->
    <!--<script src="./lib/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>-->
    <script src="./lib/angular-1.6.5/angular.min.js"></script>


    <style type="text/css">
        .dropdown:hover .dropdown-menu {
            display: block;
        }

        .dropdown-menu {
            margin: 0px 0 0 0;
        }

        .header-nav .nav li:hover {
            background: #e7e7e7;
        }

        .open {
        }

        .borderLeft {
            border-left: 1px solid #e7e7e7;
        }

        .borderRight {
            border-right: 1px solid #e7e7e7;
        }

        .commonMenu, a.commonMenu {
        }

        .commonMenu :hover, a.commonMenu:hover {
            background-color: #e7e7e7 !important;
        }

        .marginTop {
            margin-top: 20px;
        }

        .marginBottom {
            margin-bottom: 20px;
        }

        .commonTitle {
            border-top: 2px solid #e7e7e7;
            margin-bottom: 10px;
        }

    </style>

</head>
<body>
<div ng-app="myApp" ng-controller="myCtrl">

    <div id="head">
        <div class="container">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <nav class="navbar navbar-default" role="navigation">
                        <div class="navbar-header borderRight">
                            <button type="button" class="navbar-toggle" data-toggle="collapse"
                                    data-target="#bs-example-navbar-collapse-1"><span
                                    class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span
                                    class="icon-bar"></span><span class="icon-bar"></span></button>
                            <a class="navbar-brand" href="#">Self Note</a>
                        </div>

                        <div class="collapse navbar-collapse header-nav" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav">
                                <li class="borderRight">
                                    <a href="#" class="commonMenu">主页</a>
                                </li>

                                <li class="dropdown borderRight">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Note<strong
                                            class="caret"></strong></a>
                                    <ul class="dropdown-menu">
                                        <li>
                                            <a href="#activityRecord">活动记录</a>
                                        </li>
                                        <li>
                                            <a href="#memberList">会员列表</a>
                                        </li>
                                        <li>
                                            <a href="#duesRecord">充值记录</a>
                                        </li>

                                        <li>
                                            <a href="#addActivity">添加活动</a>
                                        </li>
                                        <li>
                                            <a href="#addRecharge">会费充值</a>
                                        </li>

                                        <li>
                                            <a href="#addMember">添加会员</a>
                                        </li>

                                    </ul>
                                </li>
                            </ul>

                            <ul class="nav navbar-nav navbar-right">

                                <li class="dropdown borderLeft">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Info<strong
                                            class="caret"></strong></a>
                                    <ul class="dropdown-menu">
                                        <li>
                                            <a href="#">About</a>
                                        </li>
                                        <li>
                                            <a href="#">Logout</a>
                                        </li>

                                    </ul>
                                </li>


                            </ul>
                        </div>

                    </nav>
                </div>
            </div>
        </div>
    </div>

    <div id="content">
        <div class="container">
            <div id="contentTitle">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <div class="jumbotron">
                            <h1>
                                Hello, 篮球火!
                            </h1>
                            <p>
                                主要用于记录《篮球火协会》相关活动、经费等信息。
                            </p>
                            <p>
                                <a class="btn btn-primary btn-large" href="#">Learn more</a>
                            </p>
                        </div>
                    </div>
                </div>
            </div>

            <div id="addMember" class="marginTop">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <div class="commonTitle">
                            <h3>
                                添加会员
                            </h3>
                        </div>

                        <div>
                            <form role="form" name="userForm">

                                <div class="input-group">
                                    <span class="input-group-addon">姓名</span>
                                    <input type="text" class="form-control" placeholder="姓名" ng-model="user.name"
                                           required>

                                    <span class="input-group-addon" style="margin-left: 20px">会费</span>
                                    <input type="number" class="form-control" placeholder="会费" ng-model="user.dues"
                                           required>
                                </div>

                                <div class="input-group marginTop">
                                    <span class="input-group-addon" style="margin-left: 20px">时间</span>
                                    <input type="text" class="form-control" placeholder="入会时间"
                                           ng-model="user.join_date">

                                    <span class="input-group-addon" style="margin-left: 20px">备注</span>
                                    <input type="text" class="form-control" placeholder="备注" ng-model="user.info">
                                </div>

                                <button type="submit" class="btn btn-default marginTop" ng-click="addMemberClick()"
                                        ng-disabled="userForm.$invalid">
                                    Submit
                                </button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>

            <div id="editMember" class="marginTop">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <div class="commonTitle">
                            <h3>
                                修改会员
                            </h3>
                        </div>

                        <div>
                            <form role="form" name="editUserForm">

                                <div class="input-group">
                                    <span class="input-group-addon">ID</span>
                                    <input type="text" class="form-control" placeholder="姓名" ng-model="editUser.name"
                                           required>

                                    <span class="input-group-addon">姓名</span>
                                    <input type="text" class="form-control" placeholder="姓名" ng-model="editUser.name"
                                           required>
                                </div>
                                <span class="input-group-addon" style="margin-left: 20px">时间</span>
                                <input type="text" class="form-control" placeholder="入会时间" ng-model="editUser.join_date">
                                <div class="input-group marginTop">
                                    <span class="input-group-addon" style="margin-left: 20px">备注</span>
                                    <input type="text" class="form-control" placeholder="备注" ng-model="editUser.info">
                                </div>

                                <button type="submit" class="btn btn-default marginTop" ng-click="editMemberClick()"
                                        ng-disabled="editUserForm.$invalid">
                                    Submit
                                </button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>

            <div id="memberList" class="marginTop">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <div class="commonTitle">
                            <h3>
                                会员列表
                            </h3>
                        </div>

                        <div>
                            <label>活动消费：{{dues.consume}}元</label>
                            <label>会费余额：{{dues.leave}}元</label>
                        </div>

                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th> 会员</th>
                                <th> 会员ID</th>
                                <th> 会费</th>
                                <th> 入会日期</th>
                                <th> 备注</th>
                                <th> 创建时间</th>
                                <th> 更新时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="x in memberListDatas">
                                <td> {{x.name}}</td>
                                <td> {{x.id}}</td>
                                <td> {{x.dues}}</td>
                                <td> {{x.date}}</td>
                                <td> {{x.info}}</td>
                                <td> {{x.createTime}}</td>
                                <td> {{x.lastUpdateTime}}</td>
                            </tr>
                            </tbody>
                        </table>

                        <div>
                            <ul class="pagination">
                                <li><a href="#">&laquo;</a></li>
                                <li><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">&raquo;</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <div id="addActivity" class="marginTop">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <div class="commonTitle">
                            <h3>
                                添加活动
                            </h3>
                        </div>

                        <div>
                            <form role="form" name="activityForm">

                                <div class="input-group">
                                    <span class="input-group-addon">活动名称</span>
                                    <input type="text" class="form-control" placeholder="活动名称" ng-model="activity.name"
                                           required>

                                    <span class="input-group-addon" style="margin-left: 20px">活动日期</span>
                                    <input type="text" class="form-control" placeholder="活动日期" ng-model="activity.date"
                                           required>
                                </div>

                                <div class="input-group marginTop">
                                    <span class="input-group-addon">消费类型</span>
                                    <select class="form-control" ng-model="activity.type"
                                            required>
                                        <option ng-repeat="x in activity.typeData" value="{{x.id}}">{{x.name}}</option>
                                    </select>

                                    <span class="input-group-addon">消费金额</span>
                                    <input type="number" class="form-control" placeholder="消费金额"
                                           ng-model="activity.cost" required>
                                </div>
                                <div class="input-group marginTop">
                                    <span class="input-group-addon" style="margin-left: 20px">活动详情</span>
                                    <input type="text" class="form-control" placeholder="活动详情" ng-model="activity.info">
                                </div>

                                <h4>
                                    选择参加活动人员
                                </h4>

                                <div class="checkbox">
                                    <div style="margin: 2px 10px;display: inline-block;width: 15%"
                                         ng-repeat="x in activity.usersData">
                                        <label style="min-width: 50%"><input type="checkbox" ng-model="x.checked"
                                                                             ng-change="selectUserChange()"/>{{x.name}}</label>
                                        <span style="margin: 0 3px">x</span><input type="number" ng-model="x.number"
                                                                                   ng-disabled="!x.checked"
                                                                                   style="width: 50px"
                                                                                   ng-change="selectUserChange()">
                                    </div>
                                </div>

                                <div class="marginTop" ng-if="activity.selectUsers.length>0">
                                    <span style="margin-right: 2px">已选择：</span>
                                    <span style="margin: 0 3px;" ng-repeat="x in activity.selectUsers">{{x.name}}<span
                                            style="margin: 0 2px;">x</span>{{x.number}}</span>
                                </div>

                                <div class="marginTop">
                                    <span>总计：</span><span>{{activity.number}}</span><span>人</span>
                                </div>

                                <button type="submit" class="btn btn-default marginTop" ng-click="addActivityClick()"
                                        ng-disabled="activityForm.$invalid">
                                    Submit
                                </button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>

            <div id="activityRecord" class="marginTop">
                <div class="row clearfix">
                    <div class="col-md-12 column">

                        <div class="commonTitle">
                            <h3>
                                活动记录
                            </h3>
                        </div>

                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th> 名称</th>
                                <th> 日期</th>
                                <th> 消费金额</th>
                                <th style="width: 30%"> 活动人员</th>
                                <th style="width: 20%"> 备注</th>
                                <th> 更新时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="x in activityRecordDatas">
                                <td> {{x.name}}</td>
                                <td> {{x.date}}</td>
                                <td> {{x.cost}}</td>
                                <td> {{x.usersDesc}}</td>
                                <td> {{x.info}}</td>
                                <td> {{x.lastUpdateTime}}</td>
                            </tr>
                            </tbody>
                        </table>

                        <div>
                            <ul class="pagination">
                                <li><a href="#">&laquo;</a></li>
                                <li><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">&raquo;</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <div id="addRecharge" class="marginTop">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <div class="commonTitle">
                            <h3>
                                会费充值
                            </h3>
                        </div>

                        <div>
                            <form role="form" name="rechargeForm">

                                <div class="input-group">
                                    <span class="input-group-addon">充值会员</span>
                                    <select class="form-control" id="rechargeUsersSelect" ng-model="recharge.userId"
                                            required>
                                        <option ng-repeat="x in recharge.usersData" value="{{x.id}}">{{x.name}}</option>
                                    </select>

                                    <span class="input-group-addon">充值金额</span>
                                    <input type="number" class="form-control" placeholder="充值金额"
                                           ng-model="recharge.dues" required>
                                </div>

                                <div class="input-group marginTop">
                                    <span class="input-group-addon" style="margin-left: 20px">充值日期</span>
                                    <input type="text" class="form-control" placeholder="充值日期" ng-model="recharge.date"
                                           required>

                                    <span class="input-group-addon" style="margin-left: 20px">备注</span>
                                    <input type="text" class="form-control" placeholder="备注" ng-model="recharge.info">
                                </div>

                                <button type="submit" class="btn btn-default marginTop" ng-click="addRechargeClick()"
                                        ng-disabled="rechargeForm.$invalid">
                                    Submit
                                </button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>

            <div id="duesRecord" class="marginTop">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <div class="commonTitle">
                            <h3>
                                会费记录
                            </h3>
                        </div>

                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th> 会员</th>
                                <th> 会员ID</th>
                                <th> 活动</th>
                                <th> 充值消费金额</th>
                                <th> 日期</th>
                                <th> 备注</th>
                                <th> 更新时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="x in duesRecordDatas">
                                <td> {{x.id}}</td>
                                <td> {{x.userName}}</td>
                                <td> {{x.userId}}</td>
                                <td> {{x.activityId}}</td>
                                <td> {{x.dues}}</td>
                                <td> {{x.date}}</td>
                                <td> {{x.info}}</td>
                                <td> {{x.lastUpdateTime}}</td>
                            </tr>
                            </tbody>
                        </table>

                        <div>
                            <ul class="pagination">
                                <li><a href="#">&laquo;</a></li>
                                <li><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">&raquo;</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="footer" style="padding-top: 30px"></div>

</div>

<script src="./js/myCtrl.js"></script>

</body>
</html>